async function defineComponentProps() {
  let compId;
  try {
    compId = VueElement.id;
  } catch (e) {
    compId = "map";
  }
  TempSources.compId = compId;
  const componentProps = {
    interval: 2,
    thresholdType: "interval",
    thresholdField: "judge",
    thresholdLimit: "value",
    thresholdEnable: false,
    thresholdData: [
      // 用于存储区间值的数据
      {
        startValue: 10,
        endValue: 0,
        color: "rgba(255,0,0,.5)",
      },
      {
        startValue: 20,
        endValue: 11,
        color: "rgba(255,255,0,.5)",
      },
      {
        startValue: 30,
        endValue: 21,
        color: "rgba(0,0,211,.5)",
      },
    ],
    thresholdNormalData: [
      {
        value: 10,
        color: "rgba(255,0,0,.5)",
      },
      {
        value: 20,
        color: "rgba(255,255,0,.5)",
      },
      {
        value: 30,
        color: "rgba(0,0,211,.5)",
      },
    ], // 用于存储固定值的数据

    tooltipEnable: false,
    tooltipImageBg: true,
    tooltipDefaultEnable: true, // 默认地区内的轮播数据
    tooltipBgColor: "rgba(23, 189, 237, 0.5)",
    tooltipFontSize: 16,
    tooltipData: [],
    tooltipFontColor: "rgb(255,255,255)",
    tooltipType: "default",

    mapDataInfo: {
      type: "pointAndline",
    },

    mapLayerData: [
      {
        startPointX: 113.267899,
        startPointY: 23.12052,
        endPointX: 113.464942,
        endPointY: 22.888164,
        startPointColor: "yellow",
        endPointColor: "yellow",
        lineColor: "yellow",
      },
      {
        startPointX: 113.737164,
        startPointY: 23.765557,
        endPointX: 113.464942,
        endPointY: 22.888164,
      },
    ],
  };
  componentProps.mapInfo = {
    dataType: 1,
    mapName: "广州市",
    url: "",
    mapCode: "440100",
  };
  let option = {
    cusWidth: 3,
    backgroundColor: "",
    legend: {
      show: false,
    },
    tooltip: {
      trigger: "item",
    },
    series: [
      {
        tooltip: {
          show: true,
          padding: [6, 10],
          backgroundColor: "rgba(255,255,255,.8)",
          borderColor: "#fff",
          borderRadius: "10px",
          textStyle: {
            align: "left",
            verticalAlign: "middle",
            lineHeight: 26,
            color: "rgba(0,0,0,.7)",
          },
          // data: componentProps.tooltipData
        },
        name: "数据",
        type: "map",
        map: TempSources.compId, // 自定义扩展图表类型
        aspectScale: 1,
        zoom: 0.6, //缩放
        showLegendSymbol: false,
        label: {
          show: true,
          color: "rgba(255,255,255,1)",
          fontSize: 14,
        },
        itemStyle: {
          // areaColor: "rgba(14,149,241,1)",
          areaColor: "#003669",
          // borderColor: "rgba(233,233,233,1)",
          borderColor: "rgba(63,218,255,.6)",
          borderWidth: 1,
          shadowColor: "rgba(63, 218, 255,0.6)",
          shadowBlur: 35,
          // shadowColor: "rgba(14,149,241,1)",
          // borderWidth: 1,
          // shadowBlur: 22,
          fontSize: 100,
        },
        emphasis: {
          label: {
            show: true,
            color: "rgba(255,255,255,1)",
            fontSize: 10,
          },
          itemStyle: {
            areaColor: "rgba(255,240,64,.5)",
            borderColor: "rgba(255,255,255,1)",
            borderWidth: 1,
          },
        },
        layoutCenter: ["50%", "50%"],
        layoutSize: "160%",
        markPoint: {
          symbol: "none",
        },
      },
    ],
  };
  // option.series[0].itemStyle.borderWidth = option.cusWidth
  componentProps.options = option;
  // 返回组件属性, 一定要return
  return componentProps;
}

async function defineComponentBeforeCreated({ VueElement }) {}

// 组件创建后
async function defineComponentCreated({ VueElement, VueInstance }) {}

async function defineComponentDestroy() {}

async function handleDataCallback({ ResourceData, VueInstance }) {}
